package com.bestv.search.common.service.impl;

import com.bestv.search.common.dao.ScheduleDao;
import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.Schedule;
import com.bestv.search.common.service.ScheduleManager;

import java.util.List;

public class ScheduleManagerImpl implements ScheduleManager {

    private ScheduleDao scheduleDao;

    public ScheduleDao getScheduleDao() {
        return scheduleDao;
    }

    public void setScheduleDao(ScheduleDao scheduleDao) {
        this.scheduleDao = scheduleDao;
    }

    public void saveScheduleList(DataSourceKey key, List<Schedule> list) {
        scheduleDao.saveScheduleList(list);
    }

    public List<Schedule> getSchedulesByCode(DataSourceKey key, String code) {
        return scheduleDao.getSchedulesByCode(code);
    }

    public List<Schedule> getExpiredSchedules(DataSourceKey key) {
        return scheduleDao.getExpiredSchedules();
    }
}
